package com.akkainaction.mailbox.config;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import com.akkainaction.mailbox.config.actor.UnboundPriorityMailboxActor;
import com.typesafe.config.ConfigFactory;

public class TestConfigDispatcherMailboxActor {

    public static void main(String[] args) {
        ActorSystem system = ActorSystem.create("sys", ConfigFactory.load("config-dispatcher-mailbox.conf"));
        ActorRef unboundPriorityMailboxActor = system.actorOf(Props.create(UnboundPriorityMailboxActor.class).withDispatcher("my-forkjoin-dispatcher"), "unboundPriorityMailboxActor");
        unboundPriorityMailboxActor.tell("赵六", ActorRef.noSender());
        unboundPriorityMailboxActor.tell("李四", ActorRef.noSender());
        unboundPriorityMailboxActor.tell("张三", ActorRef.noSender());
        unboundPriorityMailboxActor.tell("王五", ActorRef.noSender());
    }
}
